package com.example.onlineanswer.utils;

import com.example.onlineanswer.model.entity.SysUser;

public class UserHolder {
    private static final ThreadLocal<SysUser> tl = new ThreadLocal<>();

    public static void saveUser(SysUser user){
        tl.set(user);
    }

    public static SysUser getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
} 